package com.atguigu.springcloud.service;

import com.atguigu.springcloud.domain.CommonResult;
import com.atguigu.springcloud.domain.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 赵赳
 * @CreateTime: 2021/3/5 20:21
 * @Description:
 */
@FeignClient(value = "seata-storage-service")
@Component
public interface StorageService {
    /**
     *  库存减少
     * @param productId 订单编号
     * @param count 账户
     * @return
     */
    @PostMapping(value = "/storage/decrease")
    CommonResult decrease(@RequestParam("productId") Long productId,
                                 @RequestParam("count") Integer count);
}
